package cn.com.lms.business.course.persistence.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "bnz_course_info", schema = "bnzj", catalog = "")
public class FbCourseInfoEntity {
    private long id;
    private String title;
    private String courseType;
    private Integer recommendNum;
    private int score;
    private String desc;
    private String pictureUrl;
    private String courseFile;
    private long categoryId;
    private int courseTime;
    private String isDelete;
    private String isDownload;
    private long creator;
    private Timestamp createTime;
    private Long modifyBy;
    private Timestamp modifyTime;
    private String creatorName;
    private String modifyName;

    @Id
    @Column(name = "id")
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "title")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "course_type")
    public String getCourseType() {
        return courseType;
    }

    public void setCourseType(String courseType) {
        this.courseType = courseType;
    }

    @Basic
    @Column(name = "recommend_num")
    public Integer getRecommendNum() {
        return recommendNum;
    }

    public void setRecommendNum(Integer recommendNum) {
        this.recommendNum = recommendNum;
    }

    @Basic
    @Column(name = "score")
    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    @Basic
    @Column(name = "desc")
    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Basic
    @Column(name = "picture_url")
    public String getPictureUrl() {
        return pictureUrl;
    }

    public void setPictureUrl(String pictureUrl) {
        this.pictureUrl = pictureUrl;
    }

    @Basic
    @Column(name = "course_file")
    public String getCourseFile() {
        return courseFile;
    }

    public void setCourseFile(String courseFile) {
        this.courseFile = courseFile;
    }

    @Basic
    @Column(name = "category_id")
    public long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(long categoryId) {
        this.categoryId = categoryId;
    }

    @Basic
    @Column(name = "course_time")
    public int getCourseTime() {
        return courseTime;
    }

    public void setCourseTime(int courseTime) {
        this.courseTime = courseTime;
    }

    @Basic
    @Column(name = "is_delete")
    public String getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(String isDelete) {
        this.isDelete = isDelete;
    }

    @Basic
    @Column(name = "is_download")
    public String getIsDownload() {
        return isDownload;
    }

    public void setIsDownload(String isDownload) {
        this.isDownload = isDownload;
    }

    @Basic
    @Column(name = "creator")
    public long getCreator() {
        return creator;
    }

    public void setCreator(long creator) {
        this.creator = creator;
    }

    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "modify_by")
    public Long getModifyBy() {
        return modifyBy;
    }

    public void setModifyBy(Long modifyBy) {
        this.modifyBy = modifyBy;
    }

    @Basic
    @Column(name = "modify_time")
    public Timestamp getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Timestamp modifyTime) {
        this.modifyTime = modifyTime;
    }

    @Basic
    @Column(name = "creator_name")
    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    @Basic
    @Column(name = "modify_name")
    public String getModifyName() {
        return modifyName;
    }

    public void setModifyName(String modifyName) {
        this.modifyName = modifyName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        FbCourseInfoEntity that = (FbCourseInfoEntity) o;
        return id == that.id &&
                score == that.score &&
                categoryId == that.categoryId &&
                courseTime == that.courseTime &&
                creator == that.creator &&
                Objects.equals(title, that.title) &&
                Objects.equals(courseType, that.courseType) &&
                Objects.equals(recommendNum, that.recommendNum) &&
                Objects.equals(desc, that.desc) &&
                Objects.equals(pictureUrl, that.pictureUrl) &&
                Objects.equals(courseFile, that.courseFile) &&
                Objects.equals(isDelete, that.isDelete) &&
                Objects.equals(isDownload, that.isDownload) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(modifyBy, that.modifyBy) &&
                Objects.equals(modifyTime, that.modifyTime) &&
                Objects.equals(creatorName, that.creatorName) &&
                Objects.equals(modifyName, that.modifyName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, title, courseType, recommendNum, score, desc, pictureUrl, courseFile, categoryId, courseTime, isDelete, isDownload, creator, createTime, modifyBy, modifyTime, creatorName, modifyName);
    }
}
